
import sqlite3
import json


connDB = sqlite3.connect( 'base.sqlite' )
cursor = connDB.cursor()
cursor.execute('''
    CREATE TABLE IF NOT EXISTS notes(
    id INTEGER PRIMARY KEY,
    content TEXT NOT NULL,
    time TIME NULL,
    date DATE NULL,
    status BOOLEAN NOT NULL,
    groups INTEGER NULL
)''')

connDB.close()

language = input( 'Language:\n1 - English\n2 - Русский\nSelect language:' )
if language == '1':
    language = 'en_EN'
elif language == '2':
    language = 'ru_RU'
else:
    print( 'You did not enter the required value' )
    exit()

cfg = {
    "language": language
}

with open('userConfig.json', 'w') as f:
    json.dump(cfg, f)
